package top.superflow.version.db.compare

import top.superflow.version.compare.suggestion.CompareResult

class MetadataCompareResult protected(theSource : Any, theTarget : Any) extends CompareResult{
  private val source : Any = theSource
  
  private val target : Any = theTarget
  
  def getSource : Any = {
    this.source
  }
  
  def getTarget : Any = {
    this.target
  }
}
case class MetadataIsConsistent (source : Any, target : Any) extends MetadataCompareResult(source : Any, target : Any)

case class MetadataInconsistentHappened (source : Any, target : Any) extends MetadataCompareResult(source : Any, target : Any){
  def this() = this(None, None)
}


class MissingIncompatible (source : Any, target : Any) extends MetadataCompareResult(source : Any, target : Any)

class ExtraIncompatible (source : Any, target : Any) extends MetadataCompareResult(source : Any, target : Any)



case class IndexIncompatibleColumnMissing(source : Any, target : Any) extends MetadataCompareResult(source : Any, target : Any) 

case class IndexIncompatibleColumnExtra (source : Any, target : Any) extends MetadataCompareResult(source : Any, target : Any)

case class IndexUniqueIncompatible (source : Any, target : Any) extends MetadataCompareResult(source : Any, target : Any)

case class IndexMissingIncompatible (source : Any, target : Any) extends MissingIncompatible(source : Any, target : Any)

case class IndexExtraIncompatible (source : Any, target : Any) extends ExtraIncompatible(source : Any, target : Any)


case class FieldMissingIncompatible (source : Any, target : Any) extends MissingIncompatible(source : Any, target : Any)

case class FieldExtraIncompatible (source : Any, target : Any) extends ExtraIncompatible(source : Any, target : Any)

case class FieldTypeIncompatible (source : Any, target : Any) extends MetadataCompareResult(source : Any, target : Any)

case class FieldInsertableIncompatible (source : Any, target : Any) extends MetadataCompareResult(source : Any, target : Any)

case class FieldLengthIncompatible (source : Any, target : Any) extends MetadataCompareResult(source : Any, target : Any)

case class FieldNullableIncompatible (source : Any, target : Any) extends MetadataCompareResult(source : Any, target : Any)

case class FieldPrecisionleIncompatible (source : Any, target : Any) extends MetadataCompareResult(source : Any, target : Any)

case class FieldScaleIncompatible (source : Any, target : Any) extends MetadataCompareResult(source : Any, target : Any)

case class FieldUniqueIncompatible (source : Any, target : Any) extends MetadataCompareResult(source : Any, target : Any)

case class EntityMissingIncompatible (source : Any, target : Any) extends ExtraIncompatible(source : Any, target : Any)

case class EntityExtraIncompatible (source : Any, target : Any) extends ExtraIncompatible(source : Any, target : Any)

